package cn.jboa.entity;

import javax.persistence.*;
import java.sql.Time;

@Entity
@Table(name = "BIZ_LEAVE", schema = "SCOTT", catalog = "")
public class BizLeave {
    private int id;
    private String employeeSn;
    private Time starttime;
    private Time endtime;
    private long leaveday;
    private String reason;
    private String status;
    private String leavetype;
    private String nextDealSn;
    private String approveOpinion;
    private Time createtime;
    private Time modifytime;

    @Id
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "EMPLOYEE_SN")
    public String getEmployeeSn() {
        return employeeSn;
    }

    public void setEmployeeSn(String employeeSn) {
        this.employeeSn = employeeSn;
    }

    @Basic
    @Column(name = "STARTTIME")
    public Time getStarttime() {
        return starttime;
    }

    public void setStarttime(Time starttime) {
        this.starttime = starttime;
    }

    @Basic
    @Column(name = "ENDTIME")
    public Time getEndtime() {
        return endtime;
    }

    public void setEndtime(Time endtime) {
        this.endtime = endtime;
    }

    @Basic
    @Column(name = "LEAVEDAY")
    public long getLeaveday() {
        return leaveday;
    }

    public void setLeaveday(long leaveday) {
        this.leaveday = leaveday;
    }

    @Basic
    @Column(name = "REASON")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "LEAVETYPE")
    public String getLeavetype() {
        return leavetype;
    }

    public void setLeavetype(String leavetype) {
        this.leavetype = leavetype;
    }

    @Basic
    @Column(name = "NEXT_DEAL_SN")
    public String getNextDealSn() {
        return nextDealSn;
    }

    public void setNextDealSn(String nextDealSn) {
        this.nextDealSn = nextDealSn;
    }

    @Basic
    @Column(name = "APPROVE_OPINION")
    public String getApproveOpinion() {
        return approveOpinion;
    }

    public void setApproveOpinion(String approveOpinion) {
        this.approveOpinion = approveOpinion;
    }

    @Basic
    @Column(name = "CREATETIME")
    public Time getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Time createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "MODIFYTIME")
    public Time getModifytime() {
        return modifytime;
    }

    public void setModifytime(Time modifytime) {
        this.modifytime = modifytime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BizLeave bizLeave = (BizLeave) o;

        if (id != bizLeave.id) return false;
        if (leaveday != bizLeave.leaveday) return false;
        if (employeeSn != null ? !employeeSn.equals(bizLeave.employeeSn) : bizLeave.employeeSn != null) return false;
        if (starttime != null ? !starttime.equals(bizLeave.starttime) : bizLeave.starttime != null) return false;
        if (endtime != null ? !endtime.equals(bizLeave.endtime) : bizLeave.endtime != null) return false;
        if (reason != null ? !reason.equals(bizLeave.reason) : bizLeave.reason != null) return false;
        if (status != null ? !status.equals(bizLeave.status) : bizLeave.status != null) return false;
        if (leavetype != null ? !leavetype.equals(bizLeave.leavetype) : bizLeave.leavetype != null) return false;
        if (nextDealSn != null ? !nextDealSn.equals(bizLeave.nextDealSn) : bizLeave.nextDealSn != null) return false;
        if (approveOpinion != null ? !approveOpinion.equals(bizLeave.approveOpinion) : bizLeave.approveOpinion != null)
            return false;
        if (createtime != null ? !createtime.equals(bizLeave.createtime) : bizLeave.createtime != null) return false;
        if (modifytime != null ? !modifytime.equals(bizLeave.modifytime) : bizLeave.modifytime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (employeeSn != null ? employeeSn.hashCode() : 0);
        result = 31 * result + (starttime != null ? starttime.hashCode() : 0);
        result = 31 * result + (endtime != null ? endtime.hashCode() : 0);
        result = 31 * result + (int) (leaveday ^ (leaveday >>> 32));
        result = 31 * result + (reason != null ? reason.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (leavetype != null ? leavetype.hashCode() : 0);
        result = 31 * result + (nextDealSn != null ? nextDealSn.hashCode() : 0);
        result = 31 * result + (approveOpinion != null ? approveOpinion.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + (modifytime != null ? modifytime.hashCode() : 0);
        return result;
    }
}
